<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Configure MySQL</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="The Cacti Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Installing Under Unix"
HREF="install-unix.html"><LINK
REL="PREVIOUS"
TITLE="Configure the Webserver (Apache)"
HREF="unix-configure-httpd.html"><LINK
REL="NEXT"
TITLE="Install and Configure Cacti"
HREF="unix-configure-cacti.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="manual.css"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Cacti Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="unix-configure-httpd.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 2. Installing Under Unix</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="unix-configure-cacti.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="UNIX-CONFIGURE-MYSQL"
>Configure MySQL</A
></H1
><P
>						Set a password for the root user
					</P
><PRE
CLASS="SCREEN"
><SAMP
CLASS="PROMPT"
>shell&gt;</SAMP
> <KBD
CLASS="USERINPUT"
>mysqladmin --user=root password somepassword</KBD
>
<SAMP
CLASS="PROMPT"
>shell&gt;</SAMP
> <KBD
CLASS="USERINPUT"
>mysqladmin --user=root --password reload</KBD
></PRE
><P
>						Galera clustering:  There are several tables which are set to use the MEMORY storage engine which do not get replicated among nodes which can cause problems.  If you configure Cacti to only connect to one node of your cluster and are not load balancing this does not apply to you.
					</P
><P
>						  If you are running multiple nodes in a load-balanced environment where you connect to a VIP you should remove all but one node from rotation during Cacti installation or update.  After the installation/update login to your MySQL server and execute the following commands to update those tables to use the InnoDB engine:
					</P
><P
>						<PRE
CLASS="SCREEN"
>							<SAMP
CLASS="PROMPT"
>MariaDB [(none)]&gt;</SAMP
> <KBD
CLASS="USERINPUT"
>use cacti;</KBD
>
							<SAMP
CLASS="PROMPT"
>MariaDB [cacti]&#62;&gt;</SAMP
> <KBD
CLASS="USERINPUT"
>ALTER TABLE `automation_ips` ENGINE=InnoDB;</KBD
>
							<SAMP
CLASS="PROMPT"
>MariaDB [cacti]&#62;&gt;</SAMP
> <KBD
CLASS="USERINPUT"
>ALTER TABLE `automation_processes` ENGINE=InnoDB;</KBD
>
							<SAMP
CLASS="PROMPT"
>MariaDB [cacti]&#62;&gt;</SAMP
> <KBD
CLASS="USERINPUT"
>ALTER TABLE `data_source_stats_hourly_cache` ENGINE=InnoDB;</KBD
>
							<SAMP
CLASS="PROMPT"
>MariaDB [cacti]&#62;&gt;</SAMP
> <KBD
CLASS="USERINPUT"
>ALTER TABLE `data_source_stats_hourly_last` ENGINE=InnoDB;</KBD
>
							<SAMP
CLASS="PROMPT"
>MariaDB [cacti]&#62;&gt;</SAMP
> <KBD
CLASS="USERINPUT"
>ALTER TABLE `poller_output` ENGINE=InnoDB;</KBD
>
							<SAMP
CLASS="PROMPT"
>MariaDB [cacti]&#62;&gt;</SAMP
> <KBD
CLASS="USERINPUT"
>ALTER TABLE `poller_output_boost_processes` ENGINE=InnoDB;</KBD
>
						</PRE
>
					</P
><P
>						These changes should replicate to the other nodes in your cluster.  Allow Cacti to run at least two or three full polling cycles before placing the other nodes back into rotation.
					</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="unix-configure-httpd.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="unix-configure-cacti.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Configure the Webserver (Apache)</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="install-unix.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Install and Configure Cacti</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>